package com.ruoyi.hr.service.impl.salaryadmin;

import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.hr.mapper.salaryadmin.SalaryAdminMapper;
import com.ruoyi.hr.service.salaryadmin.SalaryAdminService;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.mapper.SysUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class SalaryAdminServiceImpl implements SalaryAdminService {

    @Autowired
    SalaryAdminMapper salaryAdminMapper;

    @Autowired
    SysUserMapper sysUserMapper;


    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public List<String> findProByPgid(String pgid) {
        List<String> ProList = salaryAdminMapper.findProByPgid(pgid);
        return ProList;
    }

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public List<String> findAllPro() {
        return salaryAdminMapper.findAllPro();
    }

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public List<Map<String, Object>> findProObject(String pgid) {
        return salaryAdminMapper.findProObject(pgid);
    }

    @DataSource(value = DataSourceType.SLAVE)
    @Override
    public List<Map<String, Object>> findAddEmpList() {
        return salaryAdminMapper.findAddEmpList();
    }
}
